# To change this template, choose Tools | Templates
# and open the template in the editor.

class Units
  UnitsOption = Struct.new(:id,:name)
  class UnitsType
    attr_reader :type_name,:options
    def initialize(name)
      @type_name=name
      @options=[]
    end
    def <<(option)
      @options << option
    end
  end

  zc01 = UnitsType.new("总参1部")
  zc01 << UnitsOption.new("11","总参1部1局")
  zc01 << UnitsOption.new("12","总参1部2局")
  zc01 << UnitsOption.new("12","总参1部3局")
  zc02 = UnitsType.new("总参2部")
  zc02 << UnitsOption.new("21","总参2部1局")
  zc02 << UnitsOption.new("22","总参2部2局")
  zc03 = UnitsType.new("总参3部")
  zc03 << UnitsOption.new("31","总参3部1局")
  zc03 << UnitsOption.new("32","总参3部2局")
  zc04 = UnitsType.new("总参4部")
  zc04 << UnitsOption.new("41","总参4部1局")
  zc04 << UnitsOption.new("42","总参4部2局")

  OPTIONS = [zc01,zc02,zc03,zc04]
end
